﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ModelLibrary;

namespace WebC
{
    public partial class base_infotree : clsBaseForm
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            loadInfo();
        }

        public void loadInfo()
        {
            BaseInfo baseinfo = null;
            DataTable dt = null;
            try
            {
                baseinfo = new BaseInfo();
                string sFullName = "";
                if (!checkModelRightById(502, ref sFullName, (clsBaseLib)baseinfo))
                {
                    errorUrl(string.Format("你没有“{0}”的权限,请与管理员联系！", sFullName));
                    return;
                }
                dt = baseinfo.getInfoTree();
            }
            catch (Exception e)
            {
                errorUrl(Convert.ToString(e));
            }
            finally
            {
                if (baseinfo != null)
                {
                    baseinfo.Dispose();
                }
            }
            if (dt != null)
            {
                tree.ininTree(dt, tvInfo, "enumlist.aspx?typeid={0}", true);
            }
        }
    }
}